/*
 * math-functions.cpp
 *
 *  Created on: Nov 1, 2014
 *      Author: burek
 */

#include "LUTs/trig.h"

float RsinLUT(int a)
{
	int m = a % R4_LUT_VALUES;
	return R4::LUT_sin[a + (a < 0) * R4_LUT_VALUES];
}

float RcosLUT(int a)
{
	int m = a % R4_LUT_VALUES;
	return R4::LUT_cos[a + (a < 0) * R4_LUT_VALUES];
}

float RtanLUT(int a)
{
	int m = a % R4_LUT_VALUES;
	return R4::LUT_tan[a + (a < 0) * R4_LUT_VALUES];
}

float RctgLUT(int a)
{
	int m = a % R4_LUT_VALUES;
	return R4::LUT_ctg[a + (a < 0) * R4_LUT_VALUES];
}
